<?php
declare (strict_types = 1);

namespace app\api\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class Collage extends Model
{
    public function collageMember()
    {
        return $this->hasMany('CollageMember','collage_id');
    }

    public function groupMaster()
    {
        return $this->belongsTo('GroupMaster','master_id')->bind(['true_name']);
    }

    public function collageGoods()
    {
        return $this->belongsTo('CollageGoods','collage_goods_id');
    }

    public function collageInfo($id)
    {
        return self::find($id);
    }
}
